package com.cloud.code.真题;

import java.math.BigInteger;
import java.util.Scanner;

public class Demo28 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        while (scanner.hasNext()){

            String line = scanner.nextLine();
            String[] split = line.split("#");

            StringBuilder stringBuilder = new StringBuilder();
            for (int i = 0; i < split.length; i++) {
                String string = Integer.toBinaryString(Integer.parseInt(split[i]));

                while (string.length()<8){
                    string = "0"+string;
                }
                stringBuilder.append(string);
            }

            System.out.println(stringBuilder);
            String s = new BigInteger(stringBuilder.toString(), 2).toString(10);
            System.out.println(s);
            System.out.println(Integer.toBinaryString(1684340997));
        }


    }
}
